package com.shop2cn.iapi.sqpayment.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.sqpayment.parameter.BatchNotCheckPaymentBean;
import com.shop2cn.iapi.sqpayment.service.BatchNotCheckPaymentCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.utils.TestDataManager;
/**
*批量对账
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_BatchNotCheckPayment{
	private static BatchNotCheckPaymentBean batchnotcheckpaymentBean;
	private static BatchNotCheckPaymentCall batchnotcheckpaymentCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("批量对账");
	}

	@Before
	public void caseUp() {
		batchnotcheckpaymentBean=new BatchNotCheckPaymentBean();
		batchnotcheckpaymentCall=new BatchNotCheckPaymentCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(batchnotcheckpaymentCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_BatchNotCheckPayment_001() {
		Logger.start(true,"未执行过对账的记录批量对账,成功");
		try {
			batchnotcheckpaymentBean.setBizId(TestDataManager.getRandomUUID().toString());
			batchnotcheckpaymentBean.setAppid("appidstest");
			batchnotcheckpaymentCall.setData(batchnotcheckpaymentBean);
			batchnotcheckpaymentCall.callService();			
			Logger.verifyEquals("ok", batchnotcheckpaymentCall.getReturnData(), "验证return");
			//TODO 查看日志
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}